package com.wzb.consumer.controller;


import com.wzb.service.GoodNightService;
import com.wzb.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import javax.annotation.Resource;


@RestController
public class TestController {

    @Reference(version = "1.0.0")
    private HelloService helloService;

    @Reference(version = "1.0.0")
    private GoodNightService goodNightService;

    /**
     * 调用服务1
     * @return
     */
    @RequestMapping("/hello")
    public String hello(){

        return helloService.sayHello();
    }
    /**
     * 调用服务2
     * @return
     */
    @RequestMapping("/goodNight")
    public String goodNight(){

        return goodNightService.goodNight();
    }


}
